<form th:action="@{/admin/m/ext/adSlot/add.gsp}" id="addForm" role="form" class="form-horizontal" action="#" method="post">
	<div class="modal-header">
		<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
		<h4 class="modal-title">新增广告信息</h4>
	</div>
	<div class="modal-body">
		<div class="row">
			<div class="col-md-12">
				<div class="form-group">
					<label class="col-md-3 control-label">广告位名称<label class="text-danger">*</label>：
					</label>
					<div class="col-md-7">
						<input name="slotName" placeholder="请输入广告位名称" type="text" class="form-control" />
					</div>
				</div>
				<div class="form-group">
					<label class="col-md-3 control-label">广告位编码<label class="text-danger">*</label>：
					</label>
					<div class="col-md-7">
						<input name="codeNum" placeholder="请输入广告位编码" type="text" class="form-control" />
					</div>
				</div>
				<div class="form-group">
					<label class="col-md-3 control-label">广告位类型<label class="text-danger">*</label>：
					</label>
					<div class="col-md-7">
						<select class="form-control" name="slotType">
							<option value="1">图片</option>
							<option value="2">文字</option>
							<option value="3">FLASH</option>
							<option value="4">代码</option>
						</select>
					</div>
				</div>
				<div class="form-group">
					<label class="col-md-3 control-label">广告位模板<label class="text-danger">*</label>：
					</label>
					<div class="col-md-7">
						<input name="slotTemplate" placeholder="请输入广告位模板" type="text" class="form-control" />
					</div>
				</div>
				<div class="form-group">
					<label class="col-md-3 control-label">广告位宽度<label class="text-danger">*</label>：
					</label>
					<div class="col-md-7">
						<input name="width" placeholder="请输入广告位宽度" type="text" class="form-control" />
					</div>
				</div>
				<div class="form-group">
					<label class="col-md-3 control-label">广告位高度<label class="text-danger">*</label>：
					</label>
					<div class="col-md-7">
						<input name="height" placeholder="请输入广告位高度" type="text" class="form-control" />
					</div>
				</div>
				<div class="form-group">
					<label class="col-md-3 control-label">广告位描述：</label>
					<div class="col-md-7">
						<textarea class="form-control" placeholder="最长140个字符" name="description" rows="3"></textarea>
					</div>
				</div>
			</div>
		</div>
	</div>
	<div class="modal-footer">
		<button class="btn btn-primary" type="submit">
			<strong>提 交</strong>
		</button>
		<button type="button" class="btn btn-default" data-dismiss="modal">
			<strong>关 闭</strong>
		</button>
	</div>
</form>
<script th:inline="javascript">
    /*<![CDATA[*/
    $(function() {
        var rules = {
            slotName : {
                required : true,
                maxlength : 20
            },
            codeNum : {
                required : true,
                maxlength : 20
            },
            slotType : {
                required : true
            },
            slotTemplate : {
                required : true,
                maxlength : 20
            },
            width : {
                required : true,
                digits : true,
                range : [ 1, 2000 ]
            },
            height : {
                required : true,
                digits : true,
                range : [ 1, 2000 ]
            },
            description : {
                maxlength : 140
            }
        }
        var messages = {

        }
        myTable.add('commonWin', 'addForm', rules, messages);
    });
    /*]]>*/
</script>